package day2.Exer;

public class Exer4 {
    public static void main(String[] args) {
        StringBuilder sb1=new StringBuilder();
        StringBuffer sb2=new StringBuffer();
        long start1=System.nanoTime();
        for(int i=0;i<100000;i++){
            sb1.append("abc");
        }
        long end1=System.nanoTime();
        long t1=end1-start1;
        System.out.println(t1);
        long start2=System.nanoTime();
        for(int i=0;i<100000;i++){
            sb2.append("abc");
        }
        long end2=System.nanoTime();
        long t2=end2-start2;
        System.out.println(t2);
    }
}
